package com.soulmate.order.api;

import com.soulmate.exception.BusinessException;
import com.soulmate.order.dto.OrderDTO;

/**
 * 订单服务
 *
 * @author huaiping
 * @date 2023/02/17
 */
public interface OrderService {
    /**
     * 通过id获取订单
     *
     * @param orderId 订单id
     * @return {@link OrderDTO}
     */
    OrderDTO getOrderById(String orderId);

    /**
     * 创建订单
     *
     * @param orderDTO 订单dto
     * @return {@link OrderDTO}
     * @throws BusinessException 业务异常
     */
    OrderDTO createOrder(OrderDTO orderDTO) throws BusinessException;
}
